<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>netshop/"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Book Store by www.softwarerusher.cn</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="js/gotocheck.js"></script>

</head>
<body>
<div id="wrap">
  <div class="header">
    <div class="logo"><a href="index.jsp"><img src="images/logo.gif" alt="" title="" border="0" /></a></div>
    <div id="menu">
      <ul>
        <li><a href="index.jsp">主页</a></li>
        <li><a href="about.jsp">关于我们</a></li>
        <li class="selected"><a href="allcategory">百科全书</a></li>
        <li><a href="todayhot">今日特供</a></li>
        <li>
        <%if(session.getAttribute("login")==(null)||"false".equals(session.getAttribute("login"))){ %>
        <a href="myaccount.jsp">
        <%}else{ %>
        <a href="myaccountlogin.jsp">
        <%} %>
        我的账户
        </a></li>
        <li><a href="register.jsp">注册账户</a></li>
        <!--<li><a href="details.jsp">价格</a></li>-->
        <li><a href="contact.jsp">联系我们</a></li>
      </ul>
    </div>
  </div>
  
  <div class="center_content">
    <div class="left_content">
      <div class="crumb_nav"> 您现在的位置： <a href="index.jsp">主页</a> &gt;&gt;<%=session.getAttribute("category") %>  </div>
      <div class="title"><span class="title_icon"><img src="images/bullet1.gif" alt="" title="" /></span><%=session.getAttribute("category") %> </div>
      <div class="new_products">
       
        <s:iterator value="bookList">
        <div class="feat_prod_box">
        <div class="prod_img"><a href="details?bookisbn=${bookIsbn }"><img src="${bookPic }" alt="" title="" border="0" /></a></div>
        <div class="prod_det_box"> <span class="special_icon"></span>
          <div class="box_top"></div>
          <div class="box_center">
            <div class="prod_title">${bookName }</div>
                        <p></p>
            <p class="details">作者：${bookAuthor }</p>
            <p class="details">出版社：${TPress.pressName }</p>
            <a href="details?bookisbn=${bookIsbn }" class="more">- 更多信息 -</a>
            <div class="clear"></div>
          </div>
          <div class="box_bottom"></div>
        </div>
        <div class="clear"></div>
      </div>
                </s:iterator>
        
        <% String current = session.getAttribute("currentpage").toString();
           String num = session.getAttribute("totalnum").toString();
           int currentpage = Integer.parseInt(current); 
           int total = Integer.parseInt(num); 
         %>
        <div class="pagination"> 
           <%if("1".equals(session.getAttribute("currentpage"))||session.getAttribute("currentpage")==null) {%>
           <a><<</a>
           <%}else{ %>
            <a href="firstpage?category=<%=session.getAttribute("categoryID") %>&requestpagenum=1"><<</a>
           <%} %>
           <%if("1".equals(session.getAttribute("currentpage"))||session.getAttribute("currentpage")==null) {%>
           <a><</a>
           <%}else{ %>
            <a href="previouspage?category=<%=session.getAttribute("categoryID") %>&requestpagenum=<%=(currentpage-1) %>"><</a>
           <%} %>
           
           <span class="current"><%=session.getAttribute("currentpage") %></span>
           

          

           <%if(num.equals(session.getAttribute("currentpage"))||session.getAttribute("currentpage")==null) {%>
           <a>></a>
           <%}else{ %>
            <a href="nextpage?category=<%=session.getAttribute("categoryID") %>&requestpagenum=<%=(currentpage+1) %>">></a>
           <%} %>
           <%if(num.equals(session.getAttribute("currentpage"))||session.getAttribute("currentpage")==null) {%>
           <a>>></a>
           <%}else{ %>
            <a href="lastpage?category=<%=session.getAttribute("categoryID") %>&requestpagenum=<%=total %>">>></a>
           <%} %>
           <form action = "pagenum" name="gotopage" class="goto"  id = "gotopage">
                  共<%=total %>到<input type="text" name = "requestpagenum" style="width:23px;height:20px;" id = "requestpagenum"/>页
                  <input type="hidden"  value = "<%=total %>" id = "mytotal"/>
                  <input type = "hidden" name = "category" value="<%=session.getAttribute("categoryID")%>"/>
               <a href="javascript:document.gotopage.submit()">确定</a>
           </form>

        </div>
      </div>
      <div class="clear"></div>
    </div>
    <!--end of left content-->
    <div class="right_content">
      <jsp:include page="cartview.jsp" /> 
      <div class="title"><span class="title_icon"><img src="images/bullet3.gif" alt="" title="" /></span>rush一下，你就知道</div>
      <div class="search">
        <form name ="search_now" action = "netshop/search" method= "post">
        <input type = "text" value = "斗破苍穹" name ="searchcontext" style="width:230px;height:20px;"/>
        <a class = "more"  href="javascript:document.search_now.submit()" ><img src="images/search_now.jpg" alt="" title="" border="0"/></a>
        </form>
        <p></p><p></p><p></p><p></p>
      </div>
      <jsp:include page="todayhot.jsp" /> 
      <jsp:include page="categorybox.jsp" />
    </div>
    <!--end of right content-->
    <div class="clear"></div>
  </div>
  <!--end of center content-->
  <div class="footer">
    <div class="left_footer"><img src="images/footer_logo.gif" alt="" title="" /><br />
      <a href="http://www.softwarerusher.cn">www.softwarerusher.cn</a></div>
    <div class="right_footer"> <a href="http://www.softwarerusher.cn">主页</a> <a href="http://www.softwarerusher.cn">关于我们</a> <a href="http://www.softwarerusher.cn">售后服务</a> <a href="http://www.softwarerusher.cn">保密规则</a> <a href="http://www.softwarerusher.cn">联系我们</a> </div>
  </div>
</div>
</body>
</html>

